package com.pactera.mavenweb.daoimpl;

import org.springframework.stereotype.Service;

import com.pactera.mavenweb.dao.IGenericDao;
import com.pactera.mavenweb.dao.RoleDao;
import com.pactera.mavenweb.entity.Role;

/**
 * RoleDao实现类
 * @author SteveXIE
 *
 */
@Service("roleDao")
public class RoleDaoImpl extends GenericDaoImpl<Role> implements
	RoleDao {
	
	public RoleDaoImpl() {
		super(Role.class);
	}

//	@Override
	@SuppressWarnings("unchecked")
	public int saveRole(Role role) {
		try {
			this.insert(role);
			return 0;
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
	}
}